package com.tudouji.project.bill.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.flow.service.pojo.BasePojo;
import com.flow.service.pojo.flow.FlowTempNode;
import com.tudouji.framework.web.domain.BaseEntity;
import com.tudouji.project.flow.domain.Flowtempnode;
import com.tudouji.project.flow.domain.Operationlogs;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 库房调拨对象 transferapply
 * 
 * @author tudouji
 * @date 2021-03-22
 */
@Data
public class Transferapply  extends BasePojo
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private String guid;

    /** 编号 */
    @Excel(name = "编号",width = 30,mergeRely = {0},mergeVertical = true)
    private String code;

    /** 调出库房名称 */
    @Excel(name = "调出库房",width = 30,mergeRely = {0},mergeVertical = true)
    private String fromsrname;
    /** 公司名 */
    @Excel(name = "调出组织",width = 30,mergeRely = {0},mergeVertical = true)
    private String orgname;
    /** 调入库房名 */
    @Excel(name = "调入库房",width = 30,mergeRely = {0},mergeVertical = true)
    private String tosrname;
    /** 调入货品名称 */
    @Excel(name = "调入组织",width = 30,mergeRely = {0},mergeVertical = true)
    private String toorgname;
    @Excel(name = "类型",width = 30,mergeRely = {0},mergeVertical = true)
    private String typename;
    @Excel(name = "物料名称")
    private String itemname;
    @Excel(name = "出库重量")
    private String itemloadweight;
    @Excel(name = "入库重量")
    private String itemunloadweight;
    @Excel(name = "状态",width = 30,mergeRely = {0},mergeVertical = true)
    private String statusname;
    /** 申请人名字 */
    @Excel(name = "申请人",width = 30,mergeRely = {0},mergeVertical = true)
    private String applyname;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "申请时间", format = "yyyy-MM-dd HH:mm:ss",width = 30,mergeRely = {0},mergeVertical = true)
    private Date createtime;
    /** 物流平台运单号 */
    private String wlcode;

    /** 调出库房ID,调整单出入库库房id */
    private String fromsrguid;


    /** 调入库房id */
    private String tosrguid;

    private String operator;

    /** 调出货品所属公司id */
    private String orgid;


    /** 计划调拨重量 */
    private BigDecimal shiftweight;

    /** 发货总重量 */
//    @Excel(name = "发货重量")
    private BigDecimal loadweight;

    /** 到货总重量 */
//    @Excel(name = "到货重量")
    private BigDecimal unloadweight;

    /** 1-待审批 5-出库质检 10-待出库 11-已出库 15-运输中 16-到货 20-入库质检 25-待入库 30结束 0-作废。 */
    private Integer status;

    /** 调拨类型1-库房调拨,2-调整出库 3-调整入库 */
    private Integer type;

    /** 流程id */
    private String flowid;

    /** 申请人 */

    private String operatorid;

    /** 最后修改时间 */

    private Date lastupdate;

    /** 部门id */
    private String departid;

    /** 部门名称 */
    private String departname;

    /** 调入货品所属公司id */
    private String toorgid;


    /** 1-需要派车，2-不需要派车 */
    private Integer isSendCar;
    private String remark;

    private Integer iscopy;

    private String deliprovince;

    private String delicity;

    private String delidistrict;

    private String deliaddress;

    private String arriprovince;

    private String arricity;

    private String arridistrict;

    private String arriaddres;

    private String freightclaim;

    private String wlcompanyguid;

    private String wlcompany;

    private String drivername;

    private String driverphone;

    private String carcode;

    private String delicontact;

    private String delicontacttel;

    private Date loadtime;

    private Date unloadtime;

    private String[] ids;

    private Integer ltStatus;

    private String condition;

    private Integer quality;//单据性质：1-其他出入库、2-调整出入库
    private String qualityname;
    private String starttime;
    private String endtime;
    private String[] departids;
    private BigDecimal fareprice;

    private BigDecimal deducttype;//前端适配，无具体意义

    private Integer faretype;

    private Integer farepricetype;

    private Integer farestatus;
    private List<FlowTempNode> nodes;

    private List<Transferapplyitem> items;

    private List<Whinformitem> itemsIn;

    private List<Whoutformitem> itemsOut;

    private List<Operationlogs> logs;

    /**
     * 检索条件
     */
    private String[] roomids;
    private String search;
    private Integer[] stats;
    private Integer[] nostats;
    private Integer[] types;
    private String deliport;
    private String arriport;
    private String containerno;

    private String itemremark;
    private List<Transferapplyitem> transferapplyitemList;

    private String[] orgIds;

    private String[] deptIds;

    private Long fromsrId;
    private Long tosrId;

    private Integer autoType;//状态1：自动0：非自动

    @Override
    public void prepareForProcess(){
        setBusTable("transferapply");
        setPlatformId(fromsrId);
        setToPlatformId(tosrId);
    }
}
